package rpc_demo

import (
	"fmt"
	"net"
	"net/rpc"
)

type HelloService struct {
}

func (s *HelloService) Hello(request string, reply *string) error {
	return nil
}

func Xx() {

	fmt.Println(1111)
}
func Ds() {

	listen, err := net.Listen("tcp", ":9091")
	if err != nil {
		return
	}
	err = rpc.RegisterName("demo", &HelloService{})
	if err != nil {
		return
	}
	conn, err := listen.Accept()
	if err != nil {
		return
	}
	rpc.ServeConn(conn)
}
